home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / DRIVES.SWG / 0046_DISK Light.pas < prev    next >
Pascal/Delphi Source File  |  1993-10-28  |  925b  |  44 lines

  1. (*
  2. =========================================================================
  3. Date: 10-02-93 (19:15)
  4. From: D.J. Murdoch
  5. Subj: Flashing The Disk Light
  6. =========================================================================
  7.  
  8. THIS IS SAFE !!!!  All it does is turn the disk light ON/OFF.  Should
  9. only be used on Floppy drives.
  10.  
  11. *)
  12.  
  13. USES Crt;
  14.  
  15. procedure turn_on_motor(drive:byte);
  16. { Remember to wait about a half second before trying to read! }
  17. begin
  18.      port[$3F2] := 12 + drive + 1 SHL (4 + drive);
  19. end;
  20.  
  21. procedure turn_off_motor(drive:byte);
  22. { drive A = 0, drive B = 1 }
  23. begin
  24.      port[$3F2] := 12 + drive;
  25. end;
  26.  
  27. VAR I : BYTE;
  28.  
  29. BEGIN
  30.  
  31. FOR I := 1 TO 10 DO  { let's make 'A' and 'B' flash for awhile }
  32.     BEGIn
  33.     Turn_On_Motor(0);
  34.     Delay(100);
  35.     Turn_Off_Motor(0);
  36.     Delay(100);
  37.     Turn_On_Motor(1);
  38.     Delay(100);
  39.     Turn_Off_Motor(1);
  40.     Delay(100);
  41.     END;
  42. END.
  43.  
  44.